<div class="print">
    <button class="btn btn-default no-print" id="print_btn" type="submit" onclick="print_w()" >打印</button>
    {volist name="list" id="vo"}
        {if condition="$i neq 1"}
        <p style="height:1cm"></p>
        {/if}
    <div class="table-boder">
        <div style="height: 1cm;padding-top: 10px;">{$vo.name}</div>
        <div class="qrcod_data" style="float:left">
            <input type="hidden" class="qrcode_txt" value="{$vo.qrcodeval}">
<!--            <img style="height:145px;width:145px;margin-left: 5px;" src="{$vo.qrcode}" />-->
            <div class="qrcode_img"></div>
        </div>
        <div class="limt">
            <div>编码:<span id="inv_id_{$i}">{$vo.number}</span></div>
            <div>型号:{$vo.specification}</div>
            <div>基本单位:{$vo.unit}</div>
            <div>常用单位:{$vo.store_unit}</div>
            <div style="display: {$vo.mbatch==0?'none':''};">
                批号:<input type="text" class="mbatch" value="{$vo.cBatch}" oninput="showQrcode({$i},this.value)" {$vo.cBatch!=''?'readonly':''} style="width: 120px;">
            </div>
        </div>
    </div>
    {if condition="$i neq count($list)"}
    <div class="pagebreak"></div>
    {/if}
    {/volist}
</div>

<script>
  function print_w(){
      var div=document.getElementById('print_btn');
      div.style.cssText="display:none"
      div.style.cssText="display:inline"
      window.print();
    }

</script>

<style>
body{
	line-height: 1.2;
}
	.qrcod_data{
		height:4cm;
		display: flex;
        justify-content: center;
        flex-direction: column;
	}
    .qrcode_img{
        width: 100px;
        height: 100px;
		padding-left:5px;
    }
    .limt{
       height:4cm;
       display: flex;
       flex-direction: column;
       justify-content: center;
       text-align:left;
       padding-left:30px;
       padding-top: 10px;
       /*line-height: 40px;*/
    }
    .print{
        margin-top:0.8cm;
    }
    .table-boder{
        width: 8cm;
        height: 5cm;
        font-size: 18px;
        /*border: 1px solid black;*/
        display: table-cell; /*IE8及Chrome，Firefox支持*/
        vertical-align: middle; /*IE8及Chrome，Firefox支持*/
        text-align: center;
    }
	.no-print{
		margin-bottom:10px;
	}
    @page{
        size:auto;
        margin:0mm
    }
    @media print {
        .pagebreak {
            clear: both;
            page-break-after: always;
        }
        .mbatch{
            border: none;
        }
    }
</style>

